<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-msgRecord-add" th:object="${order}">
			<input type="hidden" name="orderId" th:field="*{orderId}">
			<div class="form-group">
				<label class="col-sm-3 control-label">退货理由：</label>
				<div class="col-sm-8">
					<p style="margin-top: 7px" th:utext="*{refundRemark}"></p>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">是否同意：</label>
				<div class="col-sm-8">
					<div class="radio-box" >
						<input type="radio" name="status" id="status7" value="7" checked>
						<label th:for="status7">同意</label>
					</div>
					<div class="radio-box" >
						<input type="radio" name="status" id="status1" value="1">
						<label th:for="status7">拒绝</label>
					</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">备注：</label>
				<div class="col-sm-8">
					<textarea name="refundRemark" id="refundRemark" rows="6" class="form-control"></textarea>
				</div>
			</div>
		</form>
	</div>
    <div th:include="include::footer"></div>
    <script th:inline="javascript">
		var prefix = ctx + "user/userOrder";
		
		function submitHandler() {
		    if($("#status1").is(":checked") && $.common.isEmpty($("#refundRemark").val())){
		        $.modal.msgWarning("拒绝时备注不能空！");
		        $("#refundRemark").focus();
		        return;
			}
            $("#refundRemark").val("卖家："+$("#refundRemark").val());
            $.operate.save(prefix + "/edit", $('#form-msgRecord-add').serialize());
	    }
	</script>
</body>
</html>
